import request from '@/config/axios'

export interface MerchantTypeVO {
  id: number
  no: string
  name: string
  status: number
}

// 查询相亲商家类型列表分页
export const getMerchantTypePage = async (params) => {
  return await request.get({ url: `/activity/merchant-type/page`, params })
}

// 查询相亲商家类型列表
export const getMerchantTypeList = async (params) => {
  return await request.get({ url: `/activity/merchant-type/list`, params })
}

// 查询相亲商家类型详情
export const getMerchantType = async (id: number) => {
  return await request.get({ url: `/activity/merchant-type/get?id=` + id })
}

// 新增相亲商家类型
export const createMerchantType = async (data: MerchantTypeVO) => {
  return await request.post({ url: `/activity/merchant-type/create`, data })
}

// 修改相亲商家类型
export const updateMerchantType = async (data: MerchantTypeVO) => {
  return await request.put({ url: `/activity/merchant-type/update`, data })
}

// 删除相亲商家类型
export const deleteMerchantType = async (id: number) => {
  return await request.delete({ url: `/activity/merchant-type/delete?id=` + id })
}

// 导出相亲商家类型 Excel
export const exportMerchantType = async (params) => {
  return await request.download({ url: `/activity/merchant-type/export-excel`, params })
}
